<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core"
	  xmlns:p="http://primefaces.org/ui"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  template="/templates/jmeModeloSistema.xhtml">
	  
	  <ui:define name="menu">
	  	<ui:include src="/includes/jmeMenuPrincipal.xhtml"/>
	  </ui:define>
	  
	  <ui:define name="conteudo">
	  	
	  	<f:event listener="#{MBRelatorioFornecedor.prepararNovo()}" type="preRenderView" />
	  		<p:panel header="Fornecedor - Relatório">
	  		
	  			<h:form>
	  			
	  				<h:panelGrid id="pnlRelatorioFornecedor" columns="2">
	  				
	  					<p:outputLabel for="cbRelatorio" value="Selecione o tipo do relatório.:"/>
	  					
	  						<p:selectOneMenu id="cbRelatorio" value="#{MBRelatorioFornecedor.idCidade}">
	  						
	  							<f:selectItem itemValue="0" itemLabel="Todos" />
	  						
	  							<f:selectItems value="#{MBRelatorioFornecedor.cidadeCombo}" var="item" 
	  									   itemValue="#{item.idCidade}" itemLabel="#{item.nome}"/>
	  					
	  						</p:selectOneMenu>
	  						
	  					<h:outputLabel value="Data Inicial.:"/>
	  						<p:calendar locale="pt" id="dataIni" value="#{MBRelatorioFornecedor.dataIni}" showOn="button" 
	  									pattern="dd/MM/yyyy" mask="true">
	  									
	  						<p:watermark for="dataIni" value="Selecione a data inicial"/>
	  						</p:calendar>
	  					
	  					<h:outputLabel value="Data Final.:"/>
	  						<p:calendar locale="pt" id="dataFin" value="#{MBRelatorioFornecedor.dataFin}" showOn="button"
	  									pattern="dd/MM/yyyy" mask="true">
	  									
	  						<p:watermark for="dataFin" value="Selecione a data final"/>
	  						</p:calendar>
	  						
	  				</h:panelGrid>
	  				
	  			
	  				<h:panelGrid columns="1">
	  					<p:commandButton ajax="false" value="Gerar Relatório" 
	  								 actionListener="#{MBRelatorioFornecedor.validarParametro()}">
	  				
	  					</p:commandButton>
	  			
	  				</h:panelGrid>
	  		</h:form>
	  		
	  	</p:panel>
	  	
	  </ui:define>

</ui:composition>